package com.zhenghaijin.userservice;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

@SpringBootApplication
// 新增JPA相关注解
@EnableJpaRepositories(basePackages = "com.zhenghaijin.repository")
@EntityScan(basePackages = "com.zhenghaijin.model")
// 修改组件扫描配置
@ComponentScan(basePackages = {
    "com.zhenghaijin.security",
    "com.zhenghaijin.config",
    "com.zhenghaijin.controller", 
    "com.zhenghaijin.service",
    "com.zhenghaijin.repository" // 确保repository包被扫描
})
public class
UserServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(UserServiceApplication.class, args);
    }

}
